Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Added secret debug menu preference to override the push server URL ( #24170) #26667

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Aug 26, 2022

  • Created a new "sync debug" pref screen to that's only enabled when the debug menu is to hold the Fxa, Sync, and Push
    server override prefs. They were taking a lot of screen space on the top-level settings menu as individual items
  • Added button on that screen to quit FF which is needed to apply the changes.
    • This is definitely not the nicest UI, but hopefully QA can just override the prefs once save them in an emulator and never have to go back to this screen.
    • I do think this is a nicer UI than before, where FF would quit after a change to any of the prefs. That forces you to restart FF 3 times if you wanted to override all 3 server URLs.

Here's my attempt to describe the UI:
image

I couldn't think of a good way to unit test this, but I tested this with a dev build of Fenix, using the keys from fenix_firebase.xml and a-c#12687 and sending a tab seemed to work. I added some debugging in app-services, so you should be able to double check the push server URL by with adb logcat | grep push (once a-c picks up a new a-s release). The log line will look like this:

D push    : PushManager server_host: endpoint-autopush.stage.mozaws.net, http_protocol: https

I believe the firebase keys built into release builds will work with an overridden push server, but I'm not sure. Can someone who understands this better than me confirm this?

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

QA

  • QA Needed

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #24170

@bendk bendk requested review from a team as code owners August 26, 2022 17:28
Copy link
Contributor

@jonalmeida jonalmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few questions below, but this looks almost ready to land!

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
…le#24170)

- Created a new "sync debug" pref screen to hold the Fxa, Sync, and Push
  server override prefs.  They were taking a lot of screen space on the
  top-level settings menu as individual items
- Added button on that screen to quit FF which is needed to apply the
  changes.
    - This is definitely not the nicest UI, but hopefully QA can just
      override the prefs once save them in an emulator and never have to
      go back to this screen.
    - I do think this is a nicer UI than before, where FF would quit
      after a change to any of the prefs.  That forces you to restart FF
      3 times if you wanted to override all 3 server URLs.
Copy link
Contributor

@jonalmeida jonalmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, LGTM!

Will land this tomorrow morning.

@jonalmeida jonalmeida added the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Sep 2, 2022
@mergify mergify bot merged commit fb0ebe4 into mozilla-mobile:main Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read configuration information from secret settings
2 participants